package com.proyemp.entity.classes;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the tarjetas_presentacion_contactos database table.
 * 
 */
@Embeddable
public class TarjetasPresentacionContactoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="id_tarjeta")
	private Integer idTarjeta;

	@Column(name="id_contacto")
	private Integer idContacto;

    public TarjetasPresentacionContactoPK() {
    }
	public Integer getIdTarjeta() {
		return this.idTarjeta;
	}
	public void setIdTarjeta(Integer idTarjeta) {
		this.idTarjeta = idTarjeta;
	}
	public Integer getIdContacto() {
		return this.idContacto;
	}
	public void setIdContacto(Integer idContacto) {
		this.idContacto = idContacto;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TarjetasPresentacionContactoPK)) {
			return false;
		}
		TarjetasPresentacionContactoPK castOther = (TarjetasPresentacionContactoPK)other;
		return 
			this.idTarjeta.equals(castOther.idTarjeta)
			&& this.idContacto.equals(castOther.idContacto);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idTarjeta.hashCode();
		hash = hash * prime + this.idContacto.hashCode();
		
		return hash;
    }
}